package cn.com.hongfu.service.impl;
import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import cn.com.hongfu.service.KnowledgeService;
import cn.com.hongfu.dao.KnowledgeMapper;
import cn.com.hongfu.model.Knowledge;
@Service("knowledgeService")
public class KnowledgeServiceImpl implements KnowledgeService{
	@Autowired
	public KnowledgeMapper knowledgeMapper ;
	@Override
	public int saveKnowledge(Knowledge knowledge) {
		knowledgeMapper.saveKnowledge(knowledge);
		return 0;
	}
	@Override
	public List<Knowledge> getAllKnowledge() {
		return knowledgeMapper.getAllKnowledge();
	}

	@Override
	public int delKnowledge(int id) {
		// TODO Auto-generated method stub
		return knowledgeMapper.delKnowledge(id);
	}

	@Override
	public int updateKnowledge(Knowledge knowledge) {
		// TODO Auto-generated method stub
		return knowledgeMapper.updateKnowledge(knowledge);
	}
	@Override
	public Knowledge getKnowledgeById(int id) {
		return knowledgeMapper.getKnowledgeById(id);
	}
	@Override
	public List<Knowledge> getKnowledgeForIndex() {
		return knowledgeMapper.getKnowledgeForIndex();
	}
	
}
